xen: arm: clear the exclusive monitor on exception return
authorIan Campbell <ian.campbell@citrix.com>
Wed, 17 Jul 2013 11:18:51 +0000 (12:18 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 19 Jul 2013 13:50:04 +0000 (14:50 +0100)
commitc57c50c1de759583d5de629fec205254280da4f0
tree4c11452a14ba413cacf94b5b8031fcbdd7029533
parent47d1a51480ad0f602d747e460d619436c907deea
xen: arm: clear the exclusive monitor on exception return

Otherwise context switching between two vcpus which are contending the same
lock can result in a spurious success.

Our spinlock and atomics code (which we get from Linux) rely on this behaviour
because they use non-exclusive stores for single instruction operations (e.g.
spin_unlock or atomic_set).

This is not required on ARMv8 since eret implicitly clears the monitor.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/arm/arm32/entry.S